/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: user
 * Date: 2023-10-27
 * Time: 16:07
 */
public class Test {

    //好的代码 不是你写完 别人看不懂  应该是 可读性比较高
    public static void main(String[] args) {
        int a = 10;
        int n = 1;
        while (a > 10)
            while (a == 10)
                while (n > a){}
    }

    //求1!+2!+3!+4!+5!
    public static void main13(String[] args) {
        int n = 1;
        int sum = 0;
        while (n <= 5) {
            int i = 1;
            int ret = 1;
            while (i <= n) {
                ret *= i;
                i++;
            }
            //System.out.println(ret);
            sum += ret;
            n++;
        }
        System.out.println(sum);

    }



    public static void main12(String[] args) {
        int i = 1;
        int ret = 1;
        while (i <= 5) {
            ret *= i;
            i++;
        }
        System.out.println(ret);
    }

    public static void main11(String[] args) {
        int a = 1;
        int sum = 0;
        while (a <= 10) {
            sum += a;
            a++;
        }
        System.out.println(sum);



       /* while (true) {

        }*/
    }


    public static void main10(String[] args) {
        /*int a = 10;
        if(a == 5);


        {
            System.out.println("fdsafas");
        }*/

        int x = 10;
        int y = 10;
        if (x == 10) {
            if (y == 10) {
                System.out.println("aaa");
            } else {
                System.out.println("bbb");
            }
        }
    }

    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();

        if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
            System.out.println(year +" is LeapYear!");
        }else {
            System.out.println(year +" is not LeapYear!");
        }
    }

    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);

        int num = scan.nextInt();//输入一个整数

        if(num % 2 == 0) {
            System.out.println(num+" 是偶数");
        }else {
            System.out.println(num +" 是奇数");
        }
    }

    public static void main6(String[] args) {
        int a = 1;
        switch (a) {
            default:
                System.out.println("fsafaa");
                break;
            case 1:
                System.out.println(1);
                //break;//结束switch
            case 2:
                System.out.println(2);
                //break;
        }
    }

    public static void main5(String[] args) {
        /*int a = 1;
        switch (a) {
            default:
                System.out.println("fsafaa");
                break;
            case 1:
                System.out.println(1);
                //break;//结束switch
            case 2:
                System.out.println(2);
                //break;
        }*/

        String str = "abc";
        switch (str) {
            case "abc":
                System.out.println("abc");
                break;
            case "124":
                System.out.println("124");
                break;
            default:
                System.out.println("输入有误");
                break;
        }
        //可以是枚举

        //面试题： 不能作为Switch参数的数据类型是什么？ float  double  boolean long
        char ch = 'a';
        switch (ch) {

        }


    }

    public static void main4(String[] args) {
        //shift + f6
        int a = 8;
        if(a == 10) {
            System.out.println("a == 10");
        }else if(a == 5) {
            System.out.println("a == 5");
        }else if(a == 4) {
            System.out.println("a == 4");
        }else if(a == 3) {
            System.out.println("a == 3");
        }else {
            System.out.println("ssssss!");
        }

    }

    public static void main3(String[] args) {
        System.out.println(1);
        System.out.println(2);
        System.out.println(4);
        System.out.println(3);

    }

    public static void main2(String[] args) {

        /*byte a = -1;
        System.out.println(a >> 1);
        System.out.println(a >>> 1);//很大的数字
*/
       /* int a = 10;
        int b = 20;
        int max = a > b ? a : b;
        */

        boolean flg = true == false ? true : true == false ? false : false;

        System.out.println(flg);


       /* int a = 1;
        int b = 2;
        System.out.println(a == 1 && b == 2); // 左为真 且 右为真 则结果为真
        System.out.println(a == 1 && b > 100); // 左为真 但 右为假 则结果为假
        System.out.println(a > 100 && b == 2); // 左为假 但 右为真 则结果为假
        System.out.println(a > 100 && b > 100); // 左为假 且 右为假 则结果为假
*/
        //System.out.println(10 < 20 && (10/0 == 0));



       /* int a = 1;
        int b = 2;
        System.out.println(a == 1 || b == 2);//true
        System.out.println(a == 1 ||  b > 100);//true
        System.out.println(a > 100 || b == 2);//true
        System.out.println(a > 100 || b > 100);//false
*/
        //System.out.println(10 < 20|| (10/0 == 0));

        /*int a = 10;
        boolean flg = true;
        System.out.println(!false);//!布尔表达式
        System.out.println(!true);//!布尔表达式*/

        //System.out.println(10 > 20 & 10 / 0 == 0); // 程序抛出异常
        //System.out.println(10 < 20 | 10 / 0 == 0); // 程序抛出异常

        /*while(p) {

        }*/
//        if(!a) {
//
//        }
    }
    // \"hello\"
    public static void main1(String[] args) {
        System.out.println("\\\"hello\\\"");

        short a = 128;//0000 0000 1000 0000

        byte b = (byte) a;//1000 0000  -128

        System.out.println(a);
        System.out.println(b);
    }
}